import React, { Component } from 'react';

// 组件复用
class Footer extends Component {
  render(){
    return (<>
        <footer style={{backgroundColor:'#f66', height: 50}}>页脚</footer>
    </>)
  }
}

const Page1 = ()=>{
  return (<>
    <h1>page1 页面</h1>
    <Footer />
  </>)
}

const Page2 = ()=>{
  return (<>
    <h1>page2 页面</h1>
    <Footer />
  </>)
}

class App extends Component {
  render() {
    return (
      <div>

        <Page1 />

        <hr />
        <hr />

        <Page2 />

      </div>
    );
  }
}

export default App;
